<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
</body>
<script>
  const obj={
    uname:'蔡徐坤',
    age:'2.5',
    gender:'男',

  }
  localStorage.setItem('obj',JSON.stringify(obj))
  const data=JSON.parse(localStorage.getItem('obj'))
  data.uname='蔡徐坤2号'
  delete obj.gender
  console.log(obj);
  
  localStorage.setItem('obj',JSON.stringify(obj))

</script>
</html>